package com.itheima.lambda;

public class CalculatorDemo {
    public static void main(String[] args) {
        Calculator c = (int a, int b) -> {
            return a + b;
        };
        useCalaclator((a, b) -> a + b);
    }

    public static void useCalaclator(Calculator calculator) {
        int result = calculator.calc(10, 20);
        System.out.println(result);
    }
}

interface Calculator {
    int calc(int a, int b);
}
